//
//  ViewController.m
//  ZSComponent
//
//  Created by HuangZuShu on 17/9/7.
//  Copyright © 2017年 Mac. All rights reserved.
//

#import "ViewController.h"
#import "Scan_VC.h"
#import "OneTestViewController.h"
#import "TwoViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    //添加代码
    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)
    {
        self.edgesForExtendedLayout = UIRectEdgeNone;               //视图控制器，四条边不指定
        self.extendedLayoutIncludesOpaqueBars = NO;                 //不透明的操作栏<br>    self.modalPresentationCapturesStatusBarAppearance = NO;
    }
    
    
    UIButton * btn = [[UIButton alloc] init];
    btn.backgroundColor = [UIColor redColor];
    [self.view addSubview:btn];
    [btn addTarget:self action:@selector(btnAction) forControlEvents:UIControlEventTouchUpInside];
    [btn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.view.mas_centerX);
        make.centerY.equalTo(self.view.mas_centerY);
        make.width.equalTo(@100);
        make.height.equalTo(@100);
    }];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)btnAction {
    TwoViewController * onetTest =  [[TwoViewController alloc] init];
    [self.navigationController pushViewController:onetTest animated:YES];
}


@end
